Skip to content

[_]: feat/add-webdav-improvements#592

Merged
larryrider merged 13 commits into
mainfrom
feat/add-webdav-improvements
Jun 4, 2026
Merged

[_]: feat/add-webdav-improvements#592
larryrider merged 13 commits into
mainfrom
feat/add-webdav-improvements

Conversation

@larryrider

@larryrider larryrider commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

This PR introduces several improvements to the CLI's WebDAV server and core services, focusing on performance, reliability, and better error handling.

Changes:

  • Authentication caching: Added in-memory caching for auth details in AuthService and AuthMiddleware, reducing redundant token lookups and SDK re-initialization on every WebDAV request.
  • Cache key centralization: Moved cache key constants from UsageService to CacheService as public static members, promoting reuse and centralizing cache key management.
  • WebDAV MKCOL improvements: When a folder already exists, the handler now silently succeeds (returns 201) instead of throwing MethodNotAllowed, aligning with idempotent MKCOL semantics expected by many WebDAV clients.
  • WebDAV PUT conflict handling: Replaced NotFoundError with ConflictError when attempting to PUT a file whose name clashes with an existing folder. Also restructured the handler to check for existing items before beginning the upload, and gracefully handles deletion failures.
  • DatabaseService safety: Added an isInitialized guard to prevent re-initializing an already-initialized database connection.
  • Dockerfile updates: Switched base image from node:24-alpine to node:24-bookworm-slim and adjusted healthcheck parameters for more conservative intervals.
  • Test improvements: Standardized test descriptions to a consistent "should ..." pattern, added caching coverage for AuthMiddleware, and ensured cache is cleared between tests.

@larryrider larryrider requested a review from AlexisMora June 3, 2026 17:20
@larryrider larryrider self-assigned this Jun 3, 2026
Comment thread src/services/auth.service.ts Outdated
Comment thread src/webdav/handlers/MKCOL.handler.ts
@sonarqubecloud

sonarqubecloud Bot commented Jun 4, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
73.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@larryrider larryrider merged commit 23b0de3 into main Jun 4, 2026
8 of 9 checks passed
@larryrider larryrider deleted the feat/add-webdav-improvements branch June 4, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants